#include <sobjc-commons/defines.h>
#include <sobjc-commons/utils.h>
#include "sobjc/method.h"
#include "method.h"

Method
objc_make_method(SEL name, const char *types, IMP imp)
{
  Method meth;

  meth = ALLOC(struct objc_method);
  meth->meth_class = NULL;
  meth->name = name;
  meth->types = objc_strdup(types);
  meth->imp = imp;

  return meth;
}

Class
objc_method_get_method_class(Method meth)
{
  return meth->meth_class;
}

SEL
objc_method_get_name(Method meth)
{
  return meth->name;
}

const char *
objc_method_get_types(Method meth)
{
  return meth->types;
}

IMP
objc_method_get_imp(Method meth)
{
  return meth->imp;
}

